package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.AttendGoOutRuleAddDTO;
import org.jsola.hr.dto.AttendGoOutRuleUpdateDTO;
import org.jsola.hr.query.AttendGoOutRuleQuery;
import org.jsola.hr.vo.AttendGoOutRuleListVO;
import org.jsola.hr.vo.AttendGoOutRuleVO;

import java.util.List;

/**
 * @author zhr
 */
@Api(tags = "hr-外出打卡规则")
public interface IAttendGoOutRuleControllerAPI {

    /**
     * 新增外出打卡规则
     * @param attendGoOutRuleAddDTO 外出打卡规则新增实体
     * @return 外出打卡规则展示对象
     */
    @ApiOperation(value = "新增外出打卡规则")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendGoOutRuleAddDTO", dataType = "AttendGoOutRuleAddDTO", value = "新增外出打卡规则", paramType = "body")
    })
    Result<AttendGoOutRuleVO> save(AttendGoOutRuleAddDTO attendGoOutRuleAddDTO);


    /**
     * 修改外出打卡规则
     * @param attendGoOutRuleUpdateDTO 外出打卡规则
     * @return 更新数量
     */
    @ApiOperation(value = "修改外出打卡规则")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendGoOutRuleUpdateDTO", dataType = "AttendGoOutRuleUpdateDTO", value = "修改外出打卡规则", paramType = "body")
    })
    Result<Integer> update(AttendGoOutRuleUpdateDTO attendGoOutRuleUpdateDTO);


    /**
     * 删除单个外出打卡规则，彻底删除
     * @param attendGoOutRuleId 外出打卡规则id
     * @return 删除数量
     */
    @ApiOperation(value="删除单个外出打卡规则，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendGoOutRuleId", dataType = "String", value = "外出打卡规则id", paramType = "path")
    })
    Result<Integer> delete(String attendGoOutRuleId);


    /**
     * 批量删除外出打卡规则，彻底删除
     * @param attendGoOutRuleIds 外出打卡规则id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除外出打卡规则，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendGoOutRuleIds", dataType = "String[]", value = "外出打卡规则id数组", paramType = "body" ,allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] attendGoOutRuleIds);


    /**
     * 根据外出打卡规则id查询外出打卡规则详情
     * @param attendGoOutRuleId 外出打卡规则id
     * @return 外出打卡规则详情
     */
    @ApiOperation(value="根据外出打卡规则id查询外出打卡规则详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendGoOutRuleId", dataType = "String", value = "外出打卡规则id", paramType = "path")
    })
    Result<AttendGoOutRuleVO> findById(String attendGoOutRuleId);


    /**
     * 查询外出打卡规则
     * @param attendGoOutRuleQuery 外出打卡规则查询参数
     * @return page
     */
    @ApiOperation(value="查询外出打卡规则")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendGoOutRuleQuery", dataType = "AttendGoOutRuleQuery", value = "外出打卡规则查询参数", paramType = "query")
    })
    Result<List<AttendGoOutRuleListVO>> listAll(AttendGoOutRuleQuery attendGoOutRuleQuery);


     /**
     * 分页查询外出打卡规则
     * @param attendGoOutRuleQuery 外出打卡规则查询参数
     * @return page
     */
    @ApiOperation(value="分页查询外出打卡规则")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendGoOutRuleQuery", dataType = "AttendGoOutRuleQuery", value = "外出打卡规则查询参数", paramType = "query")
    })
    Result<Page<AttendGoOutRuleListVO>> page(AttendGoOutRuleQuery attendGoOutRuleQuery);

    /**
     * 查询外出打卡规则
     *
     * @return
     */
    @ApiOperation(value="查询外出打卡规则")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companyId", dataType = "String", value = "公司id", paramType = "path")
    })
    Result<AttendGoOutRuleVO> findAttendGoOutRule(String companyId);
}

